<template>
  <div class="con">
    <div class="title">
      <p>检测信息</p>
    </div>
    <ul class="detection_list">
      <li>
        <p>外观检查说明</p>
        <div>
          <h4>{{list.outText}}</h4>
        </div>
      </li>
      <li>
        <p>内饰检查说明</p>
        <div>
          <h4>{{list.inText}}</h4>
        </div>
      </li>
      <li>
        <p>骨架检查说明</p>
        <div>
          <h4>{{list.frameText}}</h4>
        </div>
      </li>
      <li>
        <p>机电检查说明</p>
        <div>
          <h4>{{list.eleText}}</h4>
        </div>
      </li>
      <li>
        <p>工具检查说明</p>
        <div>
          <h4>{{list.toolText}}</h4>
        </div>
      </li>
      <li>
        <p>油液检查说明</p>
        <div>
          <h4>{{list.oilText}}</h4>
        </div>
      </li>
      <li>
        <p>改装说明</p>
        <div>
          <h4>{{list.refit == '0' ? '无改装' : '有改装'}}</h4>
        </div>
      </li>
      <li>
        <p>配置说明</p>
        <div>
          <h4>{{list.configuration}}</h4>
        </div>
      </li>
      <li>
        <p>补充说明</p>
        <div>
          <h4>{{list.supplement}}</h4>
        </div>
      </li>
    </ul>
    <div class="carImg">
      <p>瑕疵图片</p>
    </div>
    <div class="basicPicture">
      <div class="basicPicture_box">
        <img :src="'http://cheyipai.ucarcloud.cn/auctionCarFile/' + item" alt="" v-for="(item) in DefectPic" :key="item.id">
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      list: {},
      buyCarParams: {},
      DefectPic: []
    }
  },
  created () {
    this.buyCarParams = this.$route.query
    this.getFinanceData()
  },
  methods: {
    getFinanceData () {
      // window.scrollTo(0, 0)
      this.buyCarParams = this.$route.query
      this.$http({
        url: 'http://paimai.ucarcloud.cn/auctionCarCore/checkCar/checkContent',
        params: {
          carId: this.buyCarParams.id
        },
        headers: {'from': 'web'}
      }).then(r => {
        this.list = r.data.data
        // let storage = window.localStorage
        // let jsons = storage.getItem('WSKDefectPic')
        // this.DefectPic = jsons.split(',')
      })
      this.$http({
        url: 'http://paimai.ucarcloud.cn/auctionCarCore/car/carDetail',
        params: {
          carId: this.buyCarParams.id
        },
        headers: {'from': 'web'}
      }).then(r => {
        // this.list = r.data.data
        this.DefectPic = r.data.data.carBasicPic.split(';')
        // let storage = window.localStorage
        // this.DefectPic = this.list.carDefectPic.split(',')
        // storage.setItem('WSKDefectPic', r.data.data.carDefectPic)
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.con{
  width: 1200px;
  .title{
    p{
      height: 20px;
      font-size: 16px;
      color: #333;
      padding-left: 6px;
      border-left: 3px solid #ff6f3c;
      line-height: 20px;
      margin: 30px 0;
    }
  }
  .detection_list{
    li{
      overflow: hidden;
      margin-top: -1px;
      p{
        width: 130px;
        height: 64px;
        line-height: 64px;
        padding-left: 24px;
        color: #666;
        background: #fafafa;
         border: 1px solid #e3e3e3;
         float: left;
      }
      div{
        float: left;
        width: 1040px;
        height: 64px;
        border: 1px solid #e3e3e3;
        margin-left: -1px;
        display: flex;
        justify-content: center;
        align-items: center;
        h4{
          width: 990px;
          // margin: 20px auto 0;
          line-height: 14px;
          max-height: 56px;
          overflow: hidden;
        }
      }
    }
  }
  .carImg{
    p{
      height: 20px;
      font-size: 16px;
      color: #333;
      padding-left: 6px;
      border-left: 3px solid #ff6f3c;
      line-height: 20px;
      margin: 30px 0;
    }
  }
  .basicPicture{
    width: 1200px;
    overflow: hidden;
    .basicPicture_box{
      width: 1240px;
      img{
        width: 585px;
        height: 390px;
        margin: 0 30px 30px 0;
      }
    }
  }
}
</style>
